package com.qf.service.impl;

import com.qf.pojo.Img;
import com.qf.pojo.resp.BaseResult;
import com.qf.repository.ImgRepository;
import com.qf.service.ImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImgServiceImpl implements ImgService {
    @Autowired
    ImgRepository imgRepository;
    @Override
    public BaseResult findAllImg() {
        BaseResult baseResult = new BaseResult();
        List<Img> imgs = imgRepository.findAll();
        System.out.println(imgs);
        baseResult.setCode(1);
        baseResult.setData(imgs);
        return baseResult;
    }
}
